using System;
using System.Collections.Generic;
using System.Text;

namespace One_Crappy_RPG
{
    public class Spell
    {
        public string Name;
        public bool Hostile = true;

        protected int MPCost;
        protected Creature Caster;
        protected List<StatusEffect> SpellEffects = new List<StatusEffect>();

        public int MP
        {
            get { return MPCost; }
        }

        public Spell(string name, int MP, Creature caster)
        {
            this.Name = name;
            this.MPCost = MP;
            this.Caster = caster;
        }

        public virtual void Cast(Creature target)
        {
            foreach (StatusEffect effect in SpellEffects)
                Caster.TurnEffects.Add(effect);

            Caster.TurnInProgress = true;
            Caster.TurnTime = 0.0f;
            Caster.TurnLength = 1.5f;

            Caster.Stats.CurrentMP -= MPCost;

            SpellEffects.Clear();
        }
    }
}
